package pri.zxx.webdemo.aop;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author TJ2020-6
 * @desc
 * @createTime 2020-06-02-11:21
 */
@ConfigurationProperties(value = "wx")
@Component
public class WxPayBaseConfig {


    private Map<String, Map<String, Object>> payIn = new HashMap<>();

    private Map<String, Map<String, Object>> payOut = new HashMap<>();

    //允许通过的ip地址
    private List<String> allowedIps = new ArrayList<>();

    public List<String> getAllowedIps() {
        return allowedIps;
    }

    public void setAllowedIps(List<String> allowedIps) {
        this.allowedIps = allowedIps;
    }

    public Map<String, Object> inAppInfo(String name) {
        return this.payIn.get(name);
    }

    public Map<String, Object> outAppInfo(String name) {
        return this.payOut.get(name);
    }

    public Map<String, Map<String, Object>> getPayIn() {
        return payIn;
    }

    public void setPayIn(Map<String, Map<String, Object>> payIn) {
        this.payIn = payIn;
    }

    public Map<String, Map<String, Object>> getPayOut() {
        return payOut;
    }

    public void setPayOut(Map<String, Map<String, Object>> payOut) {
        this.payOut = payOut;
    }
}
